package edu.ntu.cloudroid.nongui.com;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

import com.sun.xacml.ctx.Attribute;

/**
 * Contains the core of a general data request. If the request contains
 * inputs, one must extend this class, see LocationDataRequest, for example 
 * 
 * The point here is to provide a method for translate the inputs 
 * included in the request into List<Attributes>, to be used for building 
 * XACML request. 
 * 
 */
public class RequestNoInputs implements Serializable {
		
	 String mRequesterID;
	 String mRequestedID;	
	
	boolean forAllFriendsRequest;
	
	public RequestNoInputs(){
		
	}
	
	public RequestNoInputs(String requester, String requested){
		this.mRequesterID = requester;
		this.mRequestedID = requested;
		this.forAllFriendsRequest = false;
	}
	
	public RequestNoInputs(String requester){
		this.mRequesterID = requester;
		this.forAllFriendsRequest = true;
	}
	
		
	public boolean isForAllFriendsRequest(){
		return this.forAllFriendsRequest;
	}
	
	public String getRequesterID() {
		return mRequesterID;
	}

	public String getRequestedID() {
		return mRequestedID;
	}	
	
	public List<Attribute> getInputAttributes() throws Exception{
		return new ArrayList<Attribute>();
	}
}
